﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Store/StoreMastePage.Master" AutoEventWireup="true" CodeBehind="SendOrder.aspx.cs" Inherits="logicunivesityinventorystore.Department.SendOrder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content6" runat="server" 
    contentplaceholderid="ContentPlaceHolder2">
        <h1>Send Order</h1>
        <div>
        <table style="text-align:justify;width:100%; width: 608px;">
        <tr>
        <td style="width:33%;">
        Supplier
        </td>
        <td style="width:33%;">
            <asp:DropDownList ID="DropDownList1" runat="server" 
                DataSourceID="ObjectDataSource1" DataTextField="SupplierName" 
                DataValueField="SupplierID">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                SelectMethod="FindAll" TypeName="BusinessLogicLayer.SuppliersFacade" 
                OldValuesParameterFormatString="original_{0}">
            </asp:ObjectDataSource>
        </td>
        <td style="width:20%;">
            <asp:Button ID="btnView" runat="server" Text="View" Height="30px" 
                Width="60px" onclick="btnView_Click" CssClass="ButtonStyle" />
        </td>
        </tr>
                <tr>
        <td><br /></td>
        </tr>
        <tr>
        <td>
            <asp:Label ID="lblPurchase" runat="server" Text="Purchase Order No." 
                Visible="False"></asp:Label></td>
        <td>
            <asp:DropDownList ID="ddlNos" runat="server" DataSourceID="ObjectDataSource2" 
                Visible="False" DataTextField="PONo" DataValueField="PONo" 
                AutoPostBack="True" onselectedindexchanged="ddlNos_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
                SelectMethod="FindPendingBySupplier" TypeName="BusinessLogicLayer.OrderFacade">
                <SelectParameters>
                    <asp:ControlParameter ControlID="DropdownList1" Name="supID" 
                        PropertyName="SelectedValue" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </td>
        </tr>
                <tr>
        <td></td>
                <td>
            <asp:Label ID="lblMsg" runat="server" Text="Your order was successfully made."
                Visible="False"></asp:Label><br /></td>
        </tr>
        </table>
        
            <asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource3" 
                AutoGenerateColumns="False" Width="394px">
                <Columns>
                    <asp:BoundField DataField="ItemCode" HeaderText="ItemCode" />
                    <asp:BoundField DataField="QtyOrdered" HeaderText="Qty Ordered" />
                    <asp:BoundField DataField="Price" DataFormatString="{0:c}" 
                        HeaderText="Price($)" />
                    <asp:BoundField DataField="Amount" HeaderText="Amount" />
                </Columns>
            </asp:GridView>
        
            <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
                SelectMethod="FindforSendOrder" TypeName="BusinessLogicLayer.OrderFacade">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlNos" DefaultValue="" Name="PONo" 
                        PropertyName="SelectedValue" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <br />
            <asp:Button ID="btnSend" runat="server" Text="Send" Visible="False" 
                onclick="btnSend_Click" PostBackUrl="~/Store/SendOrder.aspx" 
                CssClass="ButtonStyle" Height="30px" Width="60px" />
        </div>
            </asp:Content>

<asp:Content ID="Content7" runat="server" 
    contentplaceholderid="ContentPlaceHolder3">
     
                </asp:Content>
<asp:Content ID="Content8" runat="server" 
    contentplaceholderid="ContentPlaceHolder5">

                </asp:Content>
<asp:Content ID="Content9" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
 
                </asp:Content>
<asp:Content ID="Content10" runat="server" 
    contentplaceholderid="ContentPlaceHolder6">
 
                </asp:Content>
<asp:Content ID="Content11" runat="server" 
    contentplaceholderid="ContentPlaceHolder7">

                </asp:Content>


